package cn.zc.student.service.controller;


import cn.zc.student.entity.Dto.StudentExercisesResultDto;
import cn.zc.student.service.service.StudentExercisesResultService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * <p>
 * 学生练习题成绩 前端控制器
 * </p>
 *
 * @author keno
 * @since 2022-02-23
 */
@Api(tags = "学生练习题成绩接口")
@RestController
@RequestMapping("/studentExercisesResult")
public class StudentExercisesResultController {
    @Resource
    private StudentExercisesResultService studentExercisesResultService;

    /**
     * 查询练习题分数
     * @param menuId
     * @param studentId
     * @return
     */
    @ApiOperation(value = "查询考试分数接口")
    @GetMapping("/find/StudentExercisesResultResult")
    private StudentExercisesResultDto findStudentExercisesResult(String menuId, String studentId){
        return studentExercisesResultService.findStudentExercisesResult(menuId,studentId);
    }


    @ApiOperation(value = "创建考试分数接口")
    @PostMapping("/create/StudentExercisesResultResult")
    private boolean createStudentExercisesResult(String menuId, String studentId,String score){
        return studentExercisesResultService.createStudentExercisesResult(menuId,studentId,score);
    }

}

